<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Calico: calico/batch_optimizer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Calico
   </div>
   <div id="projectbrief">A visual-inertial calibration library designed for rapid problem construction and debugging.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_e7ac338090e46d594d3ea7a0e9efc7ba.html">calico</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">batch_optimizer.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef CALICO_BATCH_OPTIMIZER_H_</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define CALICO_BATCH_OPTIMIZER_H_</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; </div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;calico/sensors/sensor_base.h&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;calico/trajectory.h&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;calico/world_model.h&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;ceres/solver.h&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;absl/status/statusor.h&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecalico.html">calico</a> {</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;ceres::Solver::Options <a class="code" href="namespacecalico.html#aaa1f3edabbaf4a92827f5340a76e37b6">DefaultSolverOptions</a>();</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classcalico_1_1BatchOptimizer.html">   23</a></span>&#160;<span class="keyword">class </span><a class="code" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a> {</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  ~<a class="code" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a>();</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcalico_1_1BatchOptimizer.html#adcc0fc997ccf70eb8c75b86664b0c1dc">AddSensor</a>(<a class="code" href="classcalico_1_1sensors_1_1Sensor.html">sensors::Sensor</a>* sensor, <span class="keywordtype">bool</span> take_ownership = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcalico_1_1BatchOptimizer.html#a6c02770812da1c8ad94fe59706051327">AddWorldModel</a>(<a class="code" href="classcalico_1_1WorldModel.html">WorldModel</a>* world_model, <span class="keywordtype">bool</span> take_ownership = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcalico_1_1BatchOptimizer.html#a183868df8b8f0ac1321d03332b0efbdc">AddTrajectory</a>(<a class="code" href="classcalico_1_1Trajectory.html">Trajectory</a>* trajectory_world_sensorrig,</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                     <span class="keywordtype">bool</span> take_ownership = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  absl::StatusOr&lt;ceres::Solver::Summary&gt; <a class="code" href="classcalico_1_1BatchOptimizer.html#a3ab9c0411514b4d6a02b0cca674d052b">Optimize</a>(</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;      <span class="keyword">const</span> ceres::Solver::Options&amp; options = <a class="code" href="namespacecalico.html#aaa1f3edabbaf4a92827f5340a76e37b6">DefaultSolverOptions</a>());</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <span class="keywordtype">bool</span> own_trajectory_world_body_;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <span class="keywordtype">bool</span> own_world_model_;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  std::vector&lt;bool&gt; own_sensors_;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  std::vector&lt;std::unique_ptr&lt;sensors::Sensor&gt;&gt; sensors_;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  std::unique_ptr&lt;WorldModel&gt; world_model_;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  std::unique_ptr&lt;Trajectory&gt; trajectory_world_body_;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;};</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;} <span class="comment">// namespace calico</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// CALICO_BATCH_OPTIMIZER_H_</span></div>
<div class="ttc" id="aclasscalico_1_1BatchOptimizer_html"><div class="ttname"><a href="classcalico_1_1BatchOptimizer.html">calico::BatchOptimizer</a></div><div class="ttdef"><b>Definition:</b> batch_optimizer.h:23</div></div>
<div class="ttc" id="aclasscalico_1_1BatchOptimizer_html_a183868df8b8f0ac1321d03332b0efbdc"><div class="ttname"><a href="classcalico_1_1BatchOptimizer.html#a183868df8b8f0ac1321d03332b0efbdc">calico::BatchOptimizer::AddTrajectory</a></div><div class="ttdeci">void AddTrajectory(Trajectory *trajectory_world_sensorrig, bool take_ownership=true)</div><div class="ttdef"><b>Definition:</b> batch_optimizer.cpp:47</div></div>
<div class="ttc" id="aclasscalico_1_1BatchOptimizer_html_a3ab9c0411514b4d6a02b0cca674d052b"><div class="ttname"><a href="classcalico_1_1BatchOptimizer.html#a3ab9c0411514b4d6a02b0cca674d052b">calico::BatchOptimizer::Optimize</a></div><div class="ttdeci">absl::StatusOr&lt; ceres::Solver::Summary &gt; Optimize(const ceres::Solver::Options &amp;options=DefaultSolverOptions())</div><div class="ttdef"><b>Definition:</b> batch_optimizer.cpp:53</div></div>
<div class="ttc" id="aclasscalico_1_1BatchOptimizer_html_a6c02770812da1c8ad94fe59706051327"><div class="ttname"><a href="classcalico_1_1BatchOptimizer.html#a6c02770812da1c8ad94fe59706051327">calico::BatchOptimizer::AddWorldModel</a></div><div class="ttdeci">void AddWorldModel(WorldModel *world_model, bool take_ownership=true)</div><div class="ttdef"><b>Definition:</b> batch_optimizer.cpp:41</div></div>
<div class="ttc" id="aclasscalico_1_1BatchOptimizer_html_adcc0fc997ccf70eb8c75b86664b0c1dc"><div class="ttname"><a href="classcalico_1_1BatchOptimizer.html#adcc0fc997ccf70eb8c75b86664b0c1dc">calico::BatchOptimizer::AddSensor</a></div><div class="ttdeci">void AddSensor(sensors::Sensor *sensor, bool take_ownership=true)</div><div class="ttdef"><b>Definition:</b> batch_optimizer.cpp:35</div></div>
<div class="ttc" id="aclasscalico_1_1Trajectory_html"><div class="ttname"><a href="classcalico_1_1Trajectory.html">calico::Trajectory</a></div><div class="ttdef"><b>Definition:</b> trajectory.h:25</div></div>
<div class="ttc" id="aclasscalico_1_1WorldModel_html"><div class="ttname"><a href="classcalico_1_1WorldModel.html">calico::WorldModel</a></div><div class="ttdef"><b>Definition:</b> world_model.h:73</div></div>
<div class="ttc" id="aclasscalico_1_1sensors_1_1Sensor_html"><div class="ttname"><a href="classcalico_1_1sensors_1_1Sensor.html">calico::sensors::Sensor</a></div><div class="ttdef"><b>Definition:</b> sensor_base.h:22</div></div>
<div class="ttc" id="anamespacecalico_html"><div class="ttname"><a href="namespacecalico.html">calico</a></div><div class="ttdoc">Primary calico namespace.</div><div class="ttdef"><b>Definition:</b> __init__.py:1</div></div>
<div class="ttc" id="anamespacecalico_html_aaa1f3edabbaf4a92827f5340a76e37b6"><div class="ttname"><a href="namespacecalico.html#aaa1f3edabbaf4a92827f5340a76e37b6">calico::DefaultSolverOptions</a></div><div class="ttdeci">ceres::Solver::Options DefaultSolverOptions()</div><div class="ttdoc">Default solver options.</div><div class="ttdef"><b>Definition:</b> batch_optimizer.cpp:10</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
